<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>编辑栏目</title>
	<script type='text/javascript' src='http://localhost/hdphp/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://localhost/hdphp/hdphp/Extend/Org/hdjs/hdui/css/hdui.css' rel='stylesheet' media='screen'>
<script src='http://localhost/hdphp/hdphp/Extend/Org/hdjs/hdui/js/hdui.js'></script>
<link href='http://localhost/hdphp/hdphp/Extend/Org/hdjs/hdvalidate/css/hdvalidate.css' rel='stylesheet' media='screen'>
<script src='http://localhost/hdphp/hdphp/Extend/Org/hdjs/hdvalidate/js/hdvalidate.js'></script>
<script src='http://localhost/hdphp/hdphp/Extend/Org/cal/lhgcalendar.min.js'></script>
<script src='http://localhost/hdphp/hdphp/Extend/Org/hdjs/hdslide/js/hdslide.js'></script>
<script type='text/javascript'>
HOST = 'http://localhost';
ROOT = 'http://localhost/hu_cms';
WEB = 'http://localhost/hu_cms/index.php';
URL = 'http://localhost/hu_cms/index.php?m=Admin&c=Category&a=edit&cid=3';
APP = 'http://localhost/hu_cms/CMS';
COMMON = 'http://localhost/hu_cms/CMS/Common';
HDPHP = 'http://localhost/hdphp/hdphp';
HDPHPDATA = 'http://localhost/hdphp/hdphp/Data';
HDPHPEXTEND = 'http://localhost/hdphp/hdphp/Extend';
MODULE = 'http://localhost/hu_cms/index.php?m=Admin';
CONTROLLER = 'http://localhost/hu_cms/index.php?m=Admin&c=Category';
ACTION = 'http://localhost/hu_cms/index.php?m=Admin&c=Category&a=edit';
STATIC = 'http://localhost/hu_cms/Static';
HDPHPTPL = 'http://localhost/hdphp/hdphp/Lib/Tpl';
VIEW = 'http://localhost/hu_cms/CMS/Admin/View';
PUBLIC = 'http://localhost/hu_cms/CMS/Admin/View/Public';
CONTROLLERVIEW = 'http://localhost/hu_cms/CMS/Admin/View/Category';
HISTORY = 'http://localhost/hu_cms/index.php?m=Admin&c=Category&a=index';
</script>
</head>
<body>
	<div class="wrap">
    	<div class="menu_list">
		    <ul>
		        <li><a href="<?php echo U('index');?>"  class="action">栏目列表</a></li>
		        <li><a href="<?php echo U('add');?>">添加栏目</a></li>
		    </ul>
		</div> 
		<form method="post">
			<input type="hidden" name="cid" value="<?php echo $field['cid'];?>">
			<div class="title-header">修改栏目</div>
			<table class="table1 hd-form">
				<tr>
					<th>父级</th>
					<td>
						<select name="pid" class="w200">
							<option value="0">顶级</option>
							<?php $hd["list"]["c"]["total"]=0;if(isset($category) && !empty($category)):$_id_c=0;$_index_c=0;$lastc=min(1000,count($category));
$hd["list"]["c"]["first"]=true;
$hd["list"]["c"]["last"]=false;
$_total_c=ceil($lastc/1);$hd["list"]["c"]["total"]=$_total_c;
$_data_c = array_slice($category,0,$lastc);
if(count($_data_c)==0):echo "";
else:
foreach($_data_c as $key=>$c):
if(($_id_c)%1==0):$_id_c++;else:$_id_c++;continue;endif;
$hd["list"]["c"]["index"]=++$_index_c;
if($_index_c>=$_total_c):$hd["list"]["c"]["last"]=true;endif;?>

								<option value="<?php echo $c['cid'];?>" <?php echo $c['selected'];?> <?php echo $c['disabled'];?>><?php echo $c['_name'];?></option>
							<?php $hd["list"]["c"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
						</select>
					</td>
				</tr>
				<tr>
					<th class="w100">栏目名称</th>
					<td><input type="text" name="catname" class="w200" value="<?php echo $field['catname'];?>"></td>
				</tr>
				<tr>
					<th>关键字</th>
					<td><input type="text" name="keywords" class="w200" value="<?php echo $field['keywords'];?>"></td>
				</tr>
				<tr>
					<th>描述</th>
					<td>
						<textarea name="description" class="w200 h80"><?php echo $field['description'];?></textarea>
					</td>
				</tr>
				<tr>
					<th>列表页模板</th>
					<td><input type="text" name="list_tpl" value="list.html" class="w200"></td>
				</tr>
				<tr>
					<th>详情页模板</th>
					<td><input type="text" name="content_tpl" value="content.html" class="w200"></td>
				</tr>
			</table>
			<input type="submit" class="hd-success">
		</form>
		<script type="text/javascript" src="http://localhost/hu_cms/CMS/Admin/View/Category/Js/js.js"></script>
	</div>
</body>
</html>